home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / frame.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  34 lines

  1. /* FRAME.H   Frame is a Carcase with Shadow.
  2.    It is start object for Wundow, Button and other, so it remembers
  3.    its coordinates.
  4. */
  5.  
  6. #ifndef __FRAME_H_
  7. #define __FRAME_H_
  8.  
  9. #include "output.h"
  10. #include "carcase.h"
  11. #include "shadow.h"
  12.  
  13. enum { TEXT, SCREEN };  // determines in which units we give the coordinates
  14.  
  15. class Frame : public Carcase, public Shadow
  16.     {
  17.     protected:
  18.         int tog;        // TEXT (0) OR GRAPHICS (1)
  19.     rect rectangle; // left, top, right, bottom
  20.     int shadow;     // = 0 if no shadow
  21.     BORDERS border_type;  // 0 - no, 1 ... different types.
  22.     public:
  23.     Frame(rect coordinates, BORDERS b_type = STANDART_BORDER, int s = 0,
  24.           int t = 0);
  25.  
  26.     void show();       // Draw Frame (Carcase + Shadow)
  27.     void hilite();     // Draw HILITE_BORDER
  28.     void unhilite();   // Restore border type
  29.     void press();      // Draw PRESS_BORDER. Use for BUTTON_BORDER.
  30.     void release();    // Restore hilited border type after press().
  31.         void set_rect(rect r) { rectangle = r; }
  32.     };
  33.  
  34. #endif __FRAME_H_